#ifndef TO_EXE_MINPF_H
#define TO_EXE_MINPF_H

#include <BaseCommon.h>

class ToExecuteMinPf
{
public:
    ToExecuteMinPf(const char* database, int caseid)
    {
        this->database = database;
        this->caseid = caseid;
    }
    ~ToExecuteMinPf()
    {

    }

    const char* database;
    int caseid;

    bool ExecuteMinPf()
    {
        std::string MinPfCmd;
        std::string MinPfFileName = "./bpa_temp/OPF_temp";
        MinPfCmd = "./bpa_temp/Powerflow.exe ";
        MinPfCmd += "./bpa_temp/general.cfg ";
        MinPfCmd += MinPfFileName;
        MinPfCmd += "-Data.dat ";
        MinPfCmd += MinPfFileName;
        MinPfCmd += "-BusName.dat";

        std::string command = MinPfCmd;

        JGG::Process processpfnt(command);
        int exit_status = processpfnt.get_exit_status();
        //std::cout << exit_status;
        return true;
    }

};
#endif
